*Please use "TS_Distributive Politics_District Level.dta"
*Pleas install outreg2 first
*Please change directory: cd "C:\XXX"

*table 2
cd C:\data
reg yesilkartperpop lnvoters duplicate nouniedushare if akpcontrol~=., cluster(code)
outreg2 using greencardturkish2, bdec(3) excel replace label 
reg yesilkartperpop akpdtpcomp lnvoters duplicate nouniedushare, cluster(code)
outreg2 using greencardturkish2, bdec(3) excel append label 
reg yesilkartperpop akpdtpcomp akpcontrol forcingpooled lnvoters duplicate nouniedushare, cluster(code)
outreg2 using greencardturkish2, bdec(3) excel append label 


*Appendix
*descriptive statistics
sum yesilkartperpop akpdtpcomp akpcontrol forcingpooled lnvoters nouniedushare duplicate if akpcontrol~=. & yesilkartperpop~=.

*Separate Analysis of the Two Election Periods
reg yesilkartperpop akpdtpcomp akpcontrol forcingpooled lnvoters nouniedushare if duplicate==1, cluster(code)
outreg2 using greencardturkish2apdx, bdec(3) excel replace label 
reg yesilkartperpop akpdtpcomp akpcontrol forcingpooled lnvoters nouniedushare if duplicate==0, cluster(code)
outreg2 using greencardturkish2apdx, bdec(3) excel append label 
